<div id="cate_thongtintrandau" class="w670 left">
    <div class="box_width_common">
        <div class="content_cate">
            <div class="main_content_info box_width_common">
                <div id="chitiet_anh" class="box_col_670 box_width_common">
                    <?php                    
                    if (!empty ($this->arrAlbums))
                    {
                        $albumlDetail = current($this->arrAlbums);                        
                    ?>
                        <div class="" style="display:block;">
                            <h3><?php echo $albumlDetail['title']; ?></h3>
                            <p class="time"><?php echo $this->DateTimeFormat($albumlDetail['publish_time']); ?></p>
                            <div class="content_pupop">
                                <div id="gallery" class="ad-gallery">
                                    <div class="main_content_slide">
                                        <div class="ad-image-wrapper"></div>
                                    </div>
                                    <div class="desc">
                                        <p><?php echo $albumlDetail['lead']; ?></p>
                                    </div>
                                    <?php
                                    if(!empty ($this->arrPhotos))
                                    {
                                    ?>
                                    <div class="thumb">
                                        <div class="ad-nav">
                                            <div class="ad-thumbs">
                                                <ul class="ad-thumb-list">
                                                    <?php
                                                        foreach ($this->arrPhotos as $photo) {
                                                        $photo['caption'] = isset($photo['caption'])?$photo['caption']:'';
                                                        ?>
                                                        <li>
                                                            <a href="<?php echo $this->imageurl($photo['url'], $this->imageSize['size7']); ?>">
                                                                <span class="light">&nbsp;</span>
                                                                <img src="<?php echo $this->imageurl($photo['url'], $this->imageSize['size3']); ?>"class="image0" width="137" height="92" alt="<?php echo $photo['caption']; ?>" onerror="this.src(<?php echo $this->imageurl('not-found.jpg', $this->imageSize['size3']); ?>);">
                                                            </a>
                                                            <input type="hidden" value="<?php echo $this->imageurl($photo['url'], $this->imageSize['size7']); ?>" />
                                                        </li>
                                                        <?php
                                                        }
                                                        ?>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                    <?php
                                    }
                                    ?>
                                    <div class="ad-controls">                                        
                                        <?php echo $this->render('photo/box/box_share.phtml'); ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php
                    }
                    ?>
                </div>
               

                <div id="box_list_photo_details" class="box_col_670 box_width_common football">
                    <div class="block_photo box_width_common left">
                        <div class="title_cate">
                            <p class="left">ẢNH THEO CHUYÊN MỤC</p>
                            <div class="txt_view_more"></div>
                            <div class="right w200">
                            </div>
                        </div>
                        <div class="content_block">
                            <ul class="">
                                <?php
                                if(!empty ($this->arrAlbumByArticleIds)&& count($this->arrAlbumByArticleIds)>0)
                                {
                                    $arrAlbumByArticleIds = $this->arrAlbumByArticleIds;
                                    $i = 1;
                                    foreach($arrAlbumByArticleIds as $albumByArticleIds)
                                    {
                                    ?>
                                    <li <?php echo ($i%3==0?'class="end"':'');?>>
                                        <div class="block_image_thumb"><a href="<?php echo $this->Articleurl($albumByArticleIds);?>" title="<?php echo $albumByArticleIds["title"];?>" alt="<?php echo $albumByArticleIds["title"];?>" rel="example_group"><img src="<?php echo $this->imageurl($albumByArticleIds['thumbnail_url'], $this->imageSize['size5']);?>" width="207" height="155" title="<?php echo $albumByArticleIds["title"];?>" alt="<?php echo $albumByArticleIds["title"];?>" /> <span class="icon_photo">&nbsp;</span> </a> </div>
                                        <h2> <a href="<?php echo $this->Articleurl($albumByArticleIds);?>" class="txt_black_hover_blue"><?php echo $albumByArticleIds['title']; ?></a> </h2>
                                        <p class="txt_gray txt_11">Lượt xem: <?php echo $this->Articleview($albumByArticleIds); ?> </p>
                                    </li>
                                    <?php
                                    $i++;
                                    }
                                }
                                ?>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="more_bottom_detal box_width_common">
                    <div class="left"><a href="javascript:;" class="txt_gray" id="back-top"><span class="icon_portal_thethao icon_scrolltop">&nbsp;</span> Về đầu trang</a></div>
                    <?php
                        echo $this->Pagination($this->arrParamPaging,LIMIT_ALBUM);
                    ?>
                </div>
            </div>

            <div class="clear">&nbsp;</div>
        </div>
    </div>
</div>
<script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/lib/jquery.min.js.js"></script>
<link href="<?php echo $this->config['css']; ?>/slide.css" media="screen" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/scrolltop.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->config['js']; ?>/slides.min.jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->config['js']; ?>/jquery.ad-gallery.js"></script>
<script language="javascript" type="text/javascript">
    var index = 0;
    var albumTitle = '<?php echo urlencode($arrAlbums[0]["title"]); ?>';
    var baseUrl = '<?php echo BASE_URL . urlencode($arrAlbums[0]['share_url']); ?>';
    $(document).ready(function(){
        var parts = window.location.href.split('#!');
        if(parts.length > 1)
            index = parseInt(parts[1].replace('photo-', ''));
    });
$(function(){
	$('#products').slides({
				preload: true,
				preloadImage: IMAGES_URL+'/loading.gif',
				effect: 'fade',
				crossfade: true,
				slideSpeed: 350,
				fadeSpeed: 500,
				generateNextPrev: true,
				generatePagination: false
			});
	//showPopup();
	$('.btn_close_popup a').click(
		function(){
			$('.main_ct_popup').fadeOut(500);
			$('body').css('overflow' , 'auto');
		}

	);
	
    $('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.<br>And it contains <strong>H</strong>ow <strong>T</strong>o <strong>M</strong>eet <strong>L</strong>adies... <em>What?</em> That aint what HTML stands for? Man...');
    $('img.image1').data('ad-title', 'Title through $.data');
    $('img.image4').data('ad-desc', 'This image is wider than the wrapper, so it has been scaled down');
    $('img.image5').data('ad-desc', 'This image is higher than the wrapper, so it has been scaled down');
    var galleries = $('.ad-gallery').adGallery();
    galleries[0].showImage(index);
    $('#switch-effect').change(
      function() {
        galleries[0].settings.effect = $(this).val();
        return false;
      }
    );
    $('#toggle-slideshow').click(
      function() {
        galleries[0].slideshow.toggle();
        return false;
      }
    );
    $('#toggle-description').click(
      function() {
        if(!galleries[0].settings.description_wrapper) {
          galleries[0].settings.description_wrapper = $('#descriptions');
        } else {
          galleries[0].settings.description_wrapper = false;
        }
        return false;
      }
    );
});
function showPopup(){
	$('.main_ct_popup').fadeIn(500);
	var ctheight = $(window).height();
	var ctwidth = $(window).width();
	var ctpopupwidth = $('#gallery').width();
	var ctpopupheight = $('#gallery').height();
	$('.content_pupop').css("left",(ctwidth- ctpopupwidth)/2);
	$('body').css('overflow' , 'hidden');
}

function shareFB(){
    var baseUrl = window.location.href;
    href='http://www.facebook.com/sharer.php?u=' + baseUrl + '&t=' + albumTitle;
    window.open(href, '_blank', 'height=300,width=300,resizable=no,status=no');
}

function shareBB(){
    var baseUrl = window.location.href;
    href='http://plugins.banbe.net/share/post?href=' + baseUrl + '&title=' + albumTitle;
    window.open(href, '_blank', 'height=300,width=300,resizable=no,status=no');
}

function shareTT(){
    var baseUrl = window.location.href;
    href='https://twitter.com/share?url=' + baseUrl + '&text=' + albumTitle + '';
    window.open(href, '_blank', 'height=300,width=300,resizable=no,status=no');
}
</script>